package com.example.service.Impl;

import com.example.mapper.ActivityMapper;
import com.example.pojo.Activity;
import com.example.service.ActivityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ActivityServiceImpl implements ActivityService {
    @Autowired
    private ActivityMapper activityMapper;
    @Override
    public int add(Activity activity) {
        activityMapper.InsertActivity(activity);
        return 1;
    }

    @Override
    public Activity query(int id) {
        Activity activity = activityMapper.queryActivity(id);
        return activity;
    }
}

